﻿package mortal.game.view.achievement.item
{
    import com.mui.controls.*;
    import mortal.common.swfPlayer.*;
    import mortal.common.swfPlayer.data.*;
    import mortal.game.view.common.*;

    public class AchievementRwCell extends GSprite
    {
        protected var _swf:SWFPlayer;
        private var _sp:GSprite;

        public function AchievementRwCell()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._swf = UIFactory.getUICompoment(SWFPlayer);
            this._swf.move(101, 39);
            this._swf.timeRate = 5;
            this._swf.load("guide_noName.swf", ModelType.NormalSwf, null);
            this.addChild(this._swf);
            this._sp = UIFactory.getUICompoment(GSprite, 0, 0, this);
            this._sp.scaleX = 0.85;
            this._sp.scaleY = 0.8;
            this._sp.addChild(this._swf);
            this.updateRw(false);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._sp = null;
            this._swf = null;
            return;
        }// end function

        public function updateRw(param1:Boolean) : void
        {
            if (isDisposed || this._swf == null)
            {
                return;
            }
            if (param1)
            {
                this._swf.play();
                this._swf.visible = true;
            }
            else
            {
                this._swf.stop();
                this._swf.visible = false;
            }
            return;
        }// end function

    }
}
